import Mock from 'mockjs'
import homeApi from './mockServerData/home'
import userApi from './mockServerData/user'
import permissionApi from './mockServerData/permission'

//模拟后端接收数据
Mock.mock('/home/getData',homeApi.getStatisticalData)

//对User页面的接口拦截进行数据模拟
Mock.mock(/user\/add/, 'post', userApi.createUser)//  createUser是api/mockSeverData/user.js的回调函数

Mock.mock(/user\/edit/, 'post', userApi.updateUser)//  updateUser是api/mockSeverData/user.js的回调函数

Mock.mock(/user\/getUser/, 'get', userApi.getUserList)// getUserList是api/mockSeverData/user.js的回调函数

Mock.mock(/user\/del/, 'post', userApi.deleteUser)// deleteUser是api/mockSeverData/user.js的回调函数

Mock.mock(/permission\/getMenu/,'post', permissionApi.getMenu)//getMenu是api/mockSeverData/permission.js的回调函数
